# -*- coding: utf-8 -*-
import scrapy
from scrapy import Request

class WeiSpider(scrapy.Spider):
    name = 'wei'
    allowed_domains = ['weibo.cn']
    test_url = "https://weibo.cn/comment/IxaHDovj2?uid=2310892360&rl=1#cmtfrm"

    def start_requests(self):
        for i in range(1, 501):
            yield Request(self.test_url, callback=self.parse, dont_filter=True, meta={"count": i})

    def parse(self, response):
        print("第" + str(response.meta.get("count")) + "次尝试成功")
        print("*" * 100)
        pass